josnakhatun josnakhatun's profile

Practical design of cashier counter

Practical design of cashier counter

After understanding the working principle of the four-stage cashier, we will introduce the specific design implementation through a practical case. Let's design a "unified cashier" cashier payment product, which HE Tuber can complete mainstream payment methods on the market in a unified way and complete payment in the form of a cashier.
1. Unified cashier solution
1. Unified cashier background
We hope to introduce a unified cashier system. As long as the payment platform releases a set of standard services, it can quickly expand mainstream payment methods, including "quick payment, balance payment, mini program, official account, APP, H5, scan code payment ( C scan B), barcode payment (B scan C), etc. are all supported.

2. Product implementation plan


1) Product solution analysis

From the picture above, we can see that the overall interaction between the two interfaces of WeChat and Alipay is basically the same. The only difference is that the calling cashier needs to use different calling methods due to different adapted terminals. Therefore, we adopt the "WeChat, Alipay" interface standard as the standard for our cashier service (yes, it is copied) .
What's more troublesome here is that the two payment methods, express and account, have their own characteristics in their service interaction forms, and they are not well integrated. Therefore, we uniformly package these personalized payment methods into an "aggregated checkout desk" in the form of "APP and H5" in accordance with the "four-stage interaction standard", so that the overall payment interaction is unified.

2) Unified ordering plan

Through solution analysis, we know that the personalized part of making a cashier is mainly placing orders and calling the cashier. We will start from here to build a unified cashier. As for the service interaction standard, we use WeChat's interaction method and slightly transform our own unified cashier to achieve it (we are not copying products, we are just porters of industry standards) .

Figure 12: Unified order data elements (red fonts are common message headers)
Adding payment types : To build a unified cashier, it is not simply copying WeChat, because although WeChat is standard, it is not a unified cashier. Therefore, we add a "payment type" to the unified order message to allow merchants to choose what payment method they want to use, so that the new cashiers can be expanded infinitely.
Define common elements : We hope that the common parts of each message are the same, and business elements can be added according to specific scenarios. Therefore, we need to carefully study the interface documents of various cashiers to extract the common parts. Of course, this process is still quite time-consuming and labor-intensive. In order to save everyone's time, I will give you a set of standard solutions to modify directly. Treat the fields marked in red in the figure as common message elements, and keep each message processed uniformly in this way. Other information can be added, deleted, and guaranteed according to specific business scenarios.
Extended business information : The purpose of unified order placement is to create an order to record the transaction process, and then return to different types of cashiers to provide next steps based on different payment methods. Therefore, after we define the public information for the return message, we add an extended parameter to support the return of various cashier parameters and interactive business information to the transaction initiator for the next step.

3) Cashier calling plan

After completing the order creation, we can jump to the cashier for payment. Whether this step is successfully completed is not a matter at the interface level. It relies on the payment product you applied for when the merchant first joined the network. After all, payment is a matter with high compliance requirements. What kind of scenarios are suitable for which cashiers must be reviewed based on the actual business scenarios. Let’s take a look at the preliminary preparations required to apply for a cashier. Let's take WeChat Pay as an example to introduce the entire preparation process. Alipay is basically similar to other wallet APPs, with a little conversion and background configuration.


1) Application parameters (allowing you to have an identity)

First, you need to apply for an "Application Number" and "Merchant Number" on the channel. The application number is a unified number assigned to you by the payment channel for the payment application. Simply put, with him, you can apply for various cashiers. The "merchant number" is the account number from which you can collect money.

2) Secure encryption (allowing you to pay safely)

In the final analysis, payment is an interface business. Since transaction data interaction and multi-stage interface calls are required, security certificates and keys are required to ensure secure encrypted transmission of information, and the transaction interface will not be tampered with and applied at will by the transaction initiator.

3) Apply configuration (let the cashier return)

After you apply to open a merchant, you cannot start development immediately. You need to set the return address of the checkout result page so that users can return to your platform after completing the operation. The settings here have different settings according to different cashiers. The purpose is to make the user's return smoother.

4) Ordering interface (to achieve unified ordering)

The ordering interface adopts a unified ordering method. The payment code is a little special. It is a form of scanning with a code scanner or a code scanning box (B scan C). The transaction initiator needs to upload the read QR code to the channel party. After the channel party passes the verification Return the order result to the transaction initiator.

5) Return parameters (three types of cashier parameters)

The parameters for returning to the checkout after placing an order are different, and they are mainly divided into the following three categories:
Transaction number: It returns the "prepayment number" of the created order, which is suitable for cashiers called within the channel APP (such as mini programs, official accounts, APPs, etc.). The channel will query your original order based on the prepayment number. And load the cashier for you to use.
Cashier link: suitable for payment methods such as scanning QR codes and H5 to return the QR code and cashier through payment links.
No cashier parameters: Of course, there is also a cashier like "payment code" on the user side, which does not require any interactive form of cashier information.
6) Cashier call (four technical methods)
The checkout call is relatively technical implementation level. It is divided into four methods: "API call, browser call, integrated sdk call and link access". We will introduce the details in the following article "Techniques You Need to Know About Products".

Practical design of cashier counter
Published:

Practical design of cashier counter

Published:

Creative Fields